Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODDocument


SaveToAPrevDraft

Document Shell

The SaveToAPrevDraft method consolidates the changes in the specified range of drafts.

void SaveToAPrevDraft (in ODDraft from, 
                       in ODDraft to);
from
A reference to the first (most recent) draft in the range.
to
A reference to the last (oldest) draft in the range.
DISCUSSION
If the to parameter is kODNULL, it is set to the draft immediately previous to the from draft. This method copies the content of all the drafts between the from draft (inclusive) and the to draft (exclusive) to the to draft. It then makes all the drafts from the from draft (inclusive) to the to draft (exclusive) empty. The document shell or container application can call the CollapseDrafts method to delete these empty drafts from this document.

For this method to be successful there must be no outstanding drafts between the from draft (exclusive) and the to draft (exclusive). An outstanding draft has a reference count greater than 0, meaning that it is being used by an object.

EXCEPTIONS
kODErrDraftDoesNotExist
Either the from draft does not exist, the to draft does not exist, or the from draft is not a later draft than the to draft.
kODErrOutstandingDraft
There are outstanding drafts between the from draft (exclusive) and the to draft (exclusive).
SEE ALSO
The ODDocument::CollapseDrafts method (page 138).
The ODDraft::SaveToAPrevious method (page 183).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help